var e = require;
var t = module;
var o = exports;
var n = o;
Object.defineProperty(n, "__esModule", {value: !0}), (n.PlayerLevelType = void 0);
var i,
    a = e("GlobalParam"),
    r = e("Util");
((i = n.PlayerLevelType || (n.PlayerLevelType = {})).bronze = "bronze"),
    (i.silver = "silver"),
    (i.gold = "gold"),
    (i.platinum = "platinum"),
    (i.diamonds = "diamonds"),
    (i.king = "king");
var s = (function () {
    function e() {
        (this._score = 1), (this._score = Number(r.default.getItem("PlayerLevel", "1")));
    }
    return (
        Object.defineProperty(e, "instance", {
            get: function () {
                return e._instance || (e._instance = new e()), e._instance;
            },
            enumerable: !1,
            configurable: !0
        }),
        Object.defineProperty(e.prototype, "score", {
            get: function () {
                return this._score;
            },
            set: function (e) {
                (this._score = e), r.default.setItem("PlayerLevel", this._score.toString());
            },
            enumerable: !1,
            configurable: !0
        }),
        (e.prototype.getPlayerLevel = function () {
            for (var e = a.default.PlayerLevelData, t = 0; t < e.length; t++) {
                var o = e[t];
                if (this._score >= o.start_score && this._score <= o.end_score) return o;
            }
            return e[e.length - 1];
        }),
        (e._instance = null),
        e
    );
})();
n.default = s;
